/*
 * Galaxium Messenger
 * 
 * Copyright (C) 2008 Philippe Durand <draekz@gmail.com>
 * 
 * License: GNU General Public License (GPL)
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using System.IO;
using System.Text;
using System.Net.Sockets;

namespace Galaxium.Protocol.GaduGadu
{
	public class CommandHeader : GaduCommand
	{
		protected int _type;
		protected int _length;
		
		public int Type
		{
			get { return _type; }
		}
		
		public int Length
		{
			get { return _length; }
			set { _length = value; }
		}
		
		public CommandHeader ()
		{
			
		}
		
		public CommandHeader (int type, int length)
		{
			_type = type;
			_length = length;
		}
		
		protected override void Write (BinaryWriter writer)
		{
			writer.Write (_type);
			writer.Write (_length);
		}
		
		protected override void Read (BinaryReader reader)
		{
			_type = reader.ReadInt32 ();
			_length = reader.ReadInt32 ();
		}
		
		public override string ToString ()
		{
			return String.Empty;
		}
	}
}
